//package com.hzy.auth;
//
//import org.springframework.security.authentication.AbstractAuthenticationToken;
//import org.springframework.security.core.GrantedAuthority;
//
//import java.util.Collection;
//
///**
// * Created by hongzhiyuanzj on 2018/8/2.
// */
//public class TokenAuthenticationToken extends AbstractAuthenticationToken{
//
//    private String principal;
//
//    public TokenAuthenticationToken(String userId, Collection<? extends GrantedAuthority> authorities) {
//        super(authorities);
//        principal = userId;
//    }
//
//    public TokenAuthenticationToken(String token){
//        super(null);
//        principal = token;
//    }
//
//    @Override
//    public Object getCredentials() {
//        return null;
//    }
//
//    @Override
//    public Object getPrincipal() {
//        return principal;
//    }
//}
